<!DOCTYPE html>
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>test.py</title>
<meta name="generator" content="KF5::SyntaxHighlighting - Definition (Python) - Theme (Breeze Dark)"/>
</head><body style="background-color:#232629;color:#cfcfc2"><pre>
<span style="color:#7a7c7d;"># comment with </span><span style="color:#e85848;background-color:#451e1a;font-weight:bold;">ALERT</span>

<span style="color:#7a7c7d;">''' multiline</span>
<span style="color:#7a7c7d;">    comment</span>
<span style="color:#7a7c7d;">    </span><span style="color:#81ca2d;background-color:#4d1f24;font-weight:bold;">###</span>
<span style="color:#7a7c7d;">    '''</span>

// alert check, no word delimiter check at start of word, bug <span style="color:#f67400;">397719</span>
<span style="color:#7a7c7d;">#</span><span style="color:#ca9219;background-color:#451e1a;font-weight:bold;">TODO</span>

a = <span style="color:#f67400;">100_000</span>
b = <span style="color:#f67400;">856_264.65</span>
c = <span style="color:#f67400;">0x420_F52</span>

<span style="font-weight:bold;">def</span> func(x):
    <span style="color:#7a7c7d;">&quot;&quot;&quot; EXTENDED API docs &quot;&quot;&quot;</span>
    <span style="color:#fdbc4b;font-weight:bold;">if</span> x == <span style="color:#f67400;">42</span>:
        func()
        c1 = {}
        c2 = {
            <span style="color:#f67400;">2.4</span>,
            <span style="color:#f67400;">0x42</span>,
            }
        a1 = []
        a2 = [
            <span style="color:#f44f4f;">&quot;a&quot;</span>, 032, (
                )]
    <span style="color:#fdbc4b;font-weight:bold;">else</span>:
        <span style="color:#7f8c8d;">print</span>(<span style="color:#f44f4f;">&quot;&quot;&quot;multi</span>
<span style="color:#f44f4f;">            line</span>
<span style="color:#f44f4f;">            string&quot;&quot;&quot;</span>)
        <span style="color:#7f8c8d;">print</span>(<span style="color:#f44f4f;">&quot;single \</span>
<span style="color:#f44f4f;">                continued line &quot;</span>)
        <span style="color:#7f8c8d;">print</span>(<span style="color:#f44f4f;">'single line'</span>)
    <span style="color:#fdbc4b;font-weight:bold;">return</span> <span style="color:#7f8c8d;">float</span>(<span style="color:#7f8c8d;">len</span>(a2))


<span style="font-weight:bold;">def</span> test_f_literals():
    <span style="color:#da4453;">f'xy'</span>
    <span style="color:#da4453;">f'x</span><span style="color:#3daee9;">{</span>bar<span style="color:#3daee9;">}</span><span style="color:#da4453;">y'</span>
    <span style="color:#da4453;">f'x</span><span style="color:#3daee9;">{</span>bar[<span style="color:#f44f4f;">&quot;baz&quot;</span>]<span style="color:#3daee9;">}</span><span style="color:#da4453;">y'</span>
    <span style="color:#da4453;">f'x</span><span style="color:#3daee9;">{</span>bar[<span style="color:#f44f4f;">&quot;baz&quot;</span>]<span style="color:#3daee9;">}</span><span style="color:#da4453;">y</span><span style="color:#3daee9;">\n</span><span style="color:#da4453;">'</span>

    <span style="color:#da4453;">f'x</span><span style="color:#3daee9;">{</span>bar[<span style="color:#f44f4f;">&quot;baz&quot;</span>]<span style="color:#3daee9;">!r}</span><span style="color:#da4453;">y</span><span style="color:#3daee9;">\n</span><span style="color:#da4453;">'</span>
    <span style="color:#da4453;">f'x</span><span style="color:#3daee9;">{</span>bar[<span style="color:#f44f4f;">&quot;baz&quot;</span>]<span style="color:#3daee9;">:.2}</span><span style="color:#da4453;">y</span><span style="color:#3daee9;">\n</span><span style="color:#da4453;">'</span>

a = <span style="color:#f44f4f;">&quot;Escapes in String </span><span style="color:#3daee9;">\U12345678</span><span style="color:#f44f4f;"> </span><span style="color:#3daee9;">\xAB</span><span style="color:#f44f4f;"> </span><span style="color:#3daee9;">\&quot;</span><span style="color:#f44f4f;">&quot;</span>
<span style="color:#7a7c7d;">&quot;Escapes in Doc/Comment String </span><span style="color:#3daee9;">\u1234</span><span style="color:#7a7c7d;"> </span><span style="color:#3daee9;">\xAb</span><span style="color:#7a7c7d;"> </span><span style="color:#3daee9;">\&quot;\\</span><span style="color:#7a7c7d;">&quot;</span>
<span style="color:#7a7c7d;">''' Doc/Comment String </span><span style="color:#3daee9;">\N{123}</span><span style="color:#7a7c7d;"> </span><span style="color:#3daee9;">\'</span><span style="color:#7a7c7d;">'''</span>
<span style="color:#7a7c7d;">&quot;&quot;&quot; Doc/Comment String </span><span style="color:#3daee9;">\17</span><span style="color:#7a7c7d;"> </span><span style="color:#3daee9;">\x1f</span><span style="color:#7a7c7d;"> </span><span style="color:#3daee9;">\n</span><span style="color:#7a7c7d;"> </span><span style="color:#3daee9;">\&quot;</span><span style="color:#7a7c7d;"> </span><span style="color:#3daee9;">\\</span><span style="color:#7a7c7d;">&quot;&quot;&quot;</span>

<span style="color:#7a7c7d;"># Decimal, Hex, Binary, Octal</span>
a = <span style="color:#f67400;">1_2_34L</span>
b = <span style="color:#f67400;">0_0_00_0</span>
c = <span style="color:#f67400;">0xA_3f_43D</span>
d = <span style="color:#f67400;">0b0_0_1_01</span>
e = <span style="color:#f67400;">0o71_2_34</span>
<span style="color:#7a7c7d;"># Float</span>
d = <span style="color:#f67400;">1.1E+3</span>
e = <span style="color:#f67400;">1.E+3</span>
f = <span style="color:#f67400;">.1E+3</span>
g = <span style="color:#f67400;">1E+3</span>
h = <span style="color:#f67400;">1.1</span>
i = <span style="color:#f67400;">1.</span>
j = <span style="color:#f67400;">.1</span>
k =  <span style="color:#f67400;">1</span>
l = <span style="color:#f67400;">1_0.e+3_22</span> + <span style="color:#f67400;">.2_1e2</span> + <span style="color:#f67400;">11_1.</span>
<span style="color:#7a7c7d;"># Complex</span>
m = <span style="color:#27ae60;">1.1E+3j</span>
n = <span style="color:#27ae60;">1.E+3j</span>
o = <span style="color:#27ae60;">.1E+3j</span>
p = <span style="color:#27ae60;">1E+3j</span>
q = <span style="color:#27ae60;">1.1j</span>
r = <span style="color:#27ae60;">1.j</span>
s = <span style="color:#27ae60;">.1j</span>
t =  <span style="color:#27ae60;">1j</span>
u = <span style="color:#27ae60;">1_0.e+3_22j</span> + <span style="color:#27ae60;">.2_1e2j</span> + <span style="color:#27ae60;">11_1.j</span>

<span style="color:#7a7c7d;"># Invalid numbers</span>
aaa.123
aaa123
.0x123
</pre></body></html>
